package main

import "fmt"

func main() {
	var year int
	var month int
	for {
		fmt.Println("请输入年份：")
		fmt.Scanln(&year)
		fmt.Println("请输入月份：")
		fmt.Scanln(&month)
		switch month {
		case 1, 3, 5, 7, 8, 10, 12:
			fmt.Printf("%d年的%02d月的天数是：31天\n", year, month)
		case 4, 6, 9, 11:
			fmt.Printf("%d年的%02d月的天数是：30天\n", year, month)
		case 2:
			if (year%4 == 0 && year%100 != 0) || year%400 == 0 {
				fmt.Printf("%d年的%02d月的天数是：29天\n", year, month)
			} else {
				fmt.Printf("%d年的%02d月的天数是：28天\n", year, month)
			}
		default:
			fmt.Println("输入的月份有误")
			continue
		}
	}
}
